package ltd.newbee.cloud.openfeign;


import ltd.newbee.cloud.entity.ComplexObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "goods-service-demo",path = "/goods")
public interface NewBeeGoodsDemoService {

    @GetMapping("/{goodsId}")
    String goodsDetail(@PathVariable("goodsId") int goodsId);


    @GetMapping(value = "/detail")
    String getGoodsDetail3(@RequestParam(value = "goodsId") int goodsId, @RequestParam(value = "sellStatus") int sellStatus);


    @GetMapping(value = "/listByIdArray")
    List<String> getGoodsArray(@RequestParam(value = "goodsIds") Integer[] goodsIds);

    @GetMapping(value = "/listByIdList")
    List<String> getGoodsList(@RequestParam(value = "goodsIds") List<Integer> goodsIds);

    @PostMapping(value = "/testComplexObject")
    ComplexObject testComplexObject(@RequestBody ComplexObject complexObject);

}
